import 'package:bitotus_web/responsive.dart';
import 'package:flutter/material.dart';
import 'package:flutter_kit/underground/underground.dart';

/// 默认为电脑端的大小
/// 然后根据电脑端大小调整尺寸
extension ResponsiveTextStyle on BuildContext {
  TextStyle get titleStyle {
    const TextStyle base = TextStyle(
      fontFamily: "caslon",
      color: COLOR.green,
    );

    return responsive<TextStyle>(
      base,
      phone: base.copyWith(fontSize: 45, letterSpacing: 2),
      pad: base.copyWith(fontSize: 65, letterSpacing: 5),
      computer: base.copyWith(fontSize: 90, letterSpacing: 10),
    );
  }

  TextStyle get subtitleStyle {
    const TextStyle base = TextStyle(
      fontFamily: "坊宋",
      color: COLOR.green,
    );

    return responsive<TextStyle>(
      base,
      phone: base.copyWith(fontSize: 14, letterSpacing: 6),
      pad: base.copyWith(fontSize: 17, letterSpacing: 8),
      computer: base.copyWith(fontSize: 20, letterSpacing: 10),
    );
  }
}
